feat(comments): UAT-friendly long-session QoL — drop 20-item cap, capture page URL#320
Open
AgentEnder wants to merge 2 commits into
Open
feat(comments): UAT-friendly long-session QoL — drop 20-item cap, capture page URL#320AgentEnder wants to merge 2 commits into
AgentEnder wants to merge 2 commits into
Conversation
The hard MAX_COMMENT_ITEMS=20 cap predates the 2 MB byte-size trim that was added later as a sessionStorage-quota safeguard. The byte trim is the principled limit; the count cap was a redundant artifact that silently dropped comments during long review sessions. Refs aidenybai#319
Multi-page review sessions had no way to tell which page a comment came from. Capture window.location.href at comment-creation time, display it under the comment text in the dropdown (collapsing host when it matches the current page), and append it to the copied output as an indented 'at <url>' line — mirroring the existing 'in <Component> (at <file>)' convention. Refs aidenybai#319
Contributor
|
@AgentEnder is attempting to deploy a commit to the Million Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #319.
Summary
MAX_COMMENT_ITEMS = 20inconstants.tspredates the 2 MB byte-size trim that was later added (in commitd1877670 fix) as the principled sessionStorage-quota safeguard. The count cap silently dropped older comments during longer review sessions; the byte trim already handles real storage pressure (~500–2000 typical comments fit under 2 MB).url?: stringonCommentItem(captured fromwindow.location.hrefat creation).titleon hover.at <url>to the copied content (single + copy-all) on its own indented line, mirroring the existingin <Component> (at <file>)convention fromformatStackContext. Both the plain-text and rich-MIME (application/x-react-grab) entries get the decorated content so paste targets stay consistent.Why
From #319: react-grab is being used for long UAT-style review sessions where reviewers comment across many pages. The 20-item silent drop and missing URL context were the two friction points called out.
Test plan
at <url>on its own line.at <url>line.pnpm --filter react-grab typecheckis clean.packages/react-grab/e2e/clear-history-prompt.spec.tsand friends) — no regressions.Notes
Note
Medium Risk
Changes comment persistence and clipboard output: comments are no longer capped by count and copied snippets now include a URL line, which could affect consumers expecting the previous format or increase sessionStorage churn (though still size-trimmed).
Overview
Comments history is now retained beyond the previous 20-item limit by removing the hard count cap and relying solely on the existing sessionStorage byte-size trimming.
Each
CommentItemnow recordsurl(captured at creation), surfaces a compact URL label in the comments dropdown (with full URL on hover), and appends anat <url>line when copying single comments or using copy-all (including per-entry payloads).Reviewed by Cursor Bugbot for commit e33a67a. Bugbot is set up for automated code reviews on this repo. Configure here.